<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="css/look.css">
</head>

<body>

    <div id="t">
    </div>
    <script src="js/jquery.min.js"></script>
    <script>
        var imgIndex = 1;
        var imgArray = new Array("bg1.jpg", "bg2.jpg", "bg3.jpg", "bg4.jpg");
        $(function() {
            $("#t").css({
                "height": $(window).height() - 1 + "px"
            });
            setInterval(rollImg, 2000);
        });

        function rollImg() {
            if (imgIndex > imgArray.length - 1) {
                imgIndex = 0;
            }
            $("#t").fadeOut(900, function() {
                $("#t").css("background-image", "url(img/" + imgArray[imgIndex] + ")");
                imgIndex++;
            });
            $("#t").fadeIn(700);
        }
    </script>
    <script src="js/bootstrap.min.js"></script>

</body>

</html>